﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Oops.Xna.Framework
{
	/// <summary>
	/// An extension to the <see cref="Microsoft.Xna.Framework.Curve" /> class.
	/// </summary>
	public static class CurveExtension
	{
		public static bool IsComplete(this Curve source, float value)
		{
			if (source.Keys.Count == 0)
			{
				return true;
			}

			return value >= source.Keys[source.Keys.Count - 1].Position;
		}
	}
}
